/**
 * 树形结构组员搜索
 */
import request, { IResposeItem } from "@/configs/request"
import { to } from "@/utils"

/**
 * 科室列表-树形结构
 */

export interface sysDeptOut {
  id: number;
  deptParentId: number;
  name: string;
  code?: any;
  deptType: number;
  deptTypeDes: string;
  childDept: sysDeptOut[];
  [propName: string]: any;
}

export const sysDeptTreeApi = async (): Promise<[any, IResposeItem<sysDeptOut>]> => {
  return to<IResposeItem<sysDeptOut>>(request.get("/sys/sysDept/tree"))
}




/**
 * 获取用户信息（弹窗）
 */
export interface userPopinPam {
  name?: string	// 角色名称	
  roleKey?: string	// 角色key	
  deptId?: number | null	// 部门编号	
}
export interface userPopOut {
  id: number;
  name: string;
  phone: string;
  deptName: string;
  jobTitleName?: any;
  photo: string;
  hospitalName: string;
  checked: boolean;
  [propName: string]: any;
}
export const userPopApi = async (parmas?: userPopinPam): Promise<[any, IResposeItem<Array<userPopOut>>]> => {
  return to<IResposeItem<Array<userPopOut>>>(request.post("/sys/user/pop", parmas))
}



